<?php defined('SYSPATH') or die('No direct script access.');

class Model_Articles_Category extends ORM {

  protected $_table_name = 'articles_categories';

  protected $_sorting = array('name' => 'asc');

  protected $_has_many = array(
      'article' => array('through' => 'articles_articles_categories'),
  );

    /**
   * Validate
   */
  public function validate_art_cat_add($array) {

    $validation = Validate::factory($array)
                    ->filter(TRUE, 'trim')
                    ->rule('new_category', 'not_empty');

    return $validation;
  }

}
